package com.lemon.smartsafety.entity.address;

import com.lemon.smartsafety.entity.common.IndexModel;
import com.lemon.smartsafety.utils.RulesUtils;
import com.lemon.smartsafety.utils.common.StringUtils;

import java.io.Serializable;

/**
 * Created by Cooliean on 16/4/12.
 */
public class AddrBookUserVo implements Serializable, IndexModel {
    private int    book_user_id = 0;
    private int    book_id      = 0;
    private String user_id      = "";
    private String join_time    = "";
    private String join_type    = "";
    private String remark       = "";
    private int    is_admin     = 0;
    private String user_name    = "";
    private String mobile       = "";

    private String create_user_id = "";
    private int response_status = 0;
    private String response_time = "";

    private String create_time = "";
    private String pinyin      = "";

    private String book_name  ="";
    //该用户是否绑定微信  1为绑定 0为未绑定
    private int hasWeixin  =0;

    private boolean check=false;


    public boolean isCheck() {
        return check;
    }

    public void setCheck(boolean check) {
        this.check = check;
    }

    public String getBook_name() {
        return book_name;
    }

    public void setBook_name(String book_name) {
        this.book_name = book_name;
    }

    public int getHasWeixin() {
        return hasWeixin;
    }

    public void setHasWeixin(int hasWeixin) {
        this.hasWeixin = hasWeixin;
    }

    public int getBook_user_id() {
        return book_user_id;
    }

    public void setBook_user_id(int book_user_id) {
        this.book_user_id = book_user_id;
    }

    public int getBook_id() {
        return book_id;
    }

    public void setBook_id(int book_id) {
        this.book_id = book_id;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getJoin_time() {
        return join_time;
    }

    public void setJoin_time(String join_time) {
        this.join_time = join_time;
    }

    public String getJoin_type() {
        return join_type;
    }

    public void setJoin_type(String join_type) {
        this.join_type = join_type;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getIs_admin() {
        return is_admin;
    }

    public void setIs_admin(int is_admin) {
        this.is_admin = is_admin;
    }

    public String getUser_name() {
        return user_name;
    }

    public void setUser_name(String user_name) {
        this.user_name = user_name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getCreate_user_id() {
        return create_user_id;
    }

    public void setCreate_user_id(String create_user_id) {
        this.create_user_id = create_user_id;
    }

    public int getResponse_status() {
        return response_status;
    }

    public void setResponse_status(int response_status) {
        this.response_status = response_status;
    }

    public String getResponse_time() {
        return response_time;
    }

    public void setResponse_time(String response_time) {
        this.response_time = response_time;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }


    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

    @Override
    public String getIndexCharI() {
        String charIndex = "";
        if (StringUtils.nullValue(getPinyin()).length() != 0) {
            charIndex = getPinyin().substring(0, 1);
        }

        charIndex= RulesUtils.getFristChar(charIndex);

        return charIndex;
    }

    @Override
    public String getTitleI() {
        return this.user_name;
    }

    @Override
    public String getSubTitleI() {
        return this.mobile;
    }

    @Override
    public String getStatusTip() {
        return "";
    }

    @Override
    public int getStatusI() {
        return getResponse_status();
    }

    @Override
    public void setIndexChar(String indexChar) {
        this.pinyin = indexChar;
    }
}
